<template>
  <div>
    <h1>明星列表</h1>
    <el-badge v-for="item in starList" :key="item.objectId" :value="item.score" class="item">
      <el-button>
        {{ item.name }}
      </el-button>
    </el-badge>
    
    
  </div>
</template>

<script setup>
import { ref } from 'vue';
import request from '../../utils/request.js'

const starList = ref([]) //1.定数据
// Promise语法
request.get('/classes/Star').then(res=>{
  console.log(res);
  starList.value = res.data.results 
})
</script>

<style lang="scss" scoped>

</style>